package com.example.shixun.service.impl;

import com.example.shixun.dao.SchoolUserDao;
import com.example.shixun.pojo.SchoolUser;
import com.example.shixun.service.SchoolUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Service
public class SchoolUserServiceImpl implements SchoolUserService {
    @Autowired
    SchoolUserDao schoolUserDao;

    @Override
    public Integer save(SchoolUser schoolUser) {
        return schoolUserDao.save(schoolUser);
    }

    @Override
    public List<SchoolUser> findBySchoolId(Integer id) {
        return schoolUserDao.findBySchoolId(id);
    }

    @Override
    public List<SchoolUser> findByUserId(Integer id) {
        return findByUserId(id);
    }
}
